{% macro sayhi(hour=1) %}
{% if hour>=12 %}
<p>下午好</p>
{% else %}
<p>上午好</p>
{% endif %}
{% endmacro %}


{% macro form_field(field) %}
<div class="form-group">
    {{ field.label }}
    {{ field(**kwargs) }}
    {% if field.errors %}
    {% for error in field.errors %}
    <small style="color: red;">{{ error }}</small>
    {% endfor %}
    {% endif %}
</div>
{% endmacro %}

{% macro basic_form_field(field) %}
{{ field.label }}
{{ field(**kwargs) }}
{% if field.errors %}
{% for error in field.errors %}
<small style="color: red;">{{ error }}</small>
{% endfor %}
{% endif %}
{% endmacro %}